
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RealAdmin后台管理系统模板 登录页面 - 氢设计</title>

<script src="__PUBLIC__/assets/js/jquery.min.js"></script>

<link href="__PUBLIC__/style/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div id="admin_wrapper">

          
            <form action="" method="post">
            
                   
                    <!--START LOGO  --> 
                    
                    <div id="logo">
                    
                    <h1>红狐<span>企业网</span></h1>
                    
                    </div>
                    
                    <!-- END LOGO -->
                  
                
                    <!-- TEXTBOXES -->
                    <label>管理员</label><br />
                    <input name="username" type="text" class="text large required" id="username" />
                    <br />
    				
                    <div class="clearfix">&nbsp;</div
                    
                    ><label>密码</label><br />
                    <input name="password" type="password" class="text large required" id="password" />
                     <br />
                
              		 <div class="clearfix">&nbsp;</div>
                
                <p>
                    <button type="button" id="login">登陆</button>
                    
              </p>
            </form>

    </div><!-- end admin wrapper -->
 <script type="text/javascript">
 	$("#login").on('click',function(){
 		var data = $('form').serialize();
 		$.ajax({
 			url : "{:U('index')}",
 			data : data,
 			type : 'post',
 			dataType : 'json',
 			success : function(res){
 				if(res == "OK"){
 					location = "{:U('Index/index')}";
 				}
 				else{
 					alert(res);
 				}
 			}
 		});
 	})

    $('body').keydown(function(){
        if(even.keyCode == '13'){
            $('#login').click();
        }
    })
 	
 </script>
    
</body>
</html>
